package com.glsc.ngateway.oaflow.wsclients.wsdl.download;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.oxm.jaxb.Jaxb2Marshaller;

@Configuration
public class WsdlConfigurationDownload {

    @Value("${oawebservice.urldownload}")
    private String oawebserviceUrlDownload;


    @Bean
    public Jaxb2Marshaller marshaller1() {
        Jaxb2Marshaller marshaller1 = new Jaxb2Marshaller();
        marshaller1.setContextPath("com.glsc.ngateway.oaflow.wsclients.wsdl.download");
        return marshaller1;
    }


    @Bean
    public WsClientDownload downloadClient(Jaxb2Marshaller marshaller1) {
        WsClientDownload client = new WsClientDownload();
        client.setDefaultUri(oawebserviceUrlDownload);
        client.setMarshaller(marshaller1);
        client.setUnmarshaller(marshaller1);
        return client;
    }

    public String getOawebserviceUrlDownload() {
        return oawebserviceUrlDownload;
    }

    public void setOawebserviceUrlDownload(String oawebserviceUrlDownload) {
        this.oawebserviceUrlDownload = oawebserviceUrlDownload;
    }
}
